Copyright: Copyright ® 1996 Simon Carter


Main
  SC 4 Visual Basic

Disclaimer	Copyright	Inform

Visual Basic Enhancements

The Following either replace the standard or are new

for developing in Visual Basic 4 32 Bit Environment

Project Wizard	Open Project

Repository	Resource Editor

To Help You Develop

SCWL is a set of functions and routines that could be useful

in a variety of projects.  The complete set consists of two

Dynamic Link Libraries (DLL's) and 1 Visual Basic Module

SCWL Files

Other Menu Options

To Help Development the following are designed to make

things that little bit easier

Register OLE Server	Compile Resources

Add File	Help

Other Stuff

About	Options

Future Ideas	Errors And Warnings


Register OLE Server

Related

Select OLE Server and click Open.  This will then register the DLL or EXE with the Registry using REGSVR32.EXE


REGSVR32.EXE

Program supplied with VB4 usually located in VB Directory & \clisvr


Related OLE Server
Topics Related To OLE Server

Options


Options Page 1

Related


Options

General

Project Manager - These are options related to Open Project

Page 3 - Not Yet Implemented


Options Page 2
Options Project Manager

Related	Open Project

This Option allows you to add user defined tabs to the Open Project window.


Options Page 3

Related


Related To Options

Page 1	Page 2	Page 3


Help

Opens This help file


Copyright

Disclaimer

Copyright © 1996 Simon Carter.  All Rights Reserved.

This Material is Copyright You May Freely Distribute It As Long As All Files Are Kept Together.

Files Include

SC4VB.DLL	-	Visual Basic Add-In

SC4VB.HLP	-	This Help File

SCWL.DLL	-	16 Bit DLL Containing Common Functions And Forms

SCWL32.DLL	-	32 Bit DLL Containing Common Functions And Forms

SCWL32.BAS	-	Visual Basic Module Containing Common Function And Declarations For DLL's Plus Extra Functions

SC4VB.CNT - Help Contents File

VB.CNT - Help Contents File

SC4VB.TXT - Installing Instructions


Disclaimer

The Software provided is copyright material.

No warranties are implied and no responsibility can be taken by the author as to the workability of the program or associated material.

This Software is Free ware which means anybody can use this software for free. Without Warranty.

Please Distribute this software to your friends and colleagues


About
About SC 4 Visual Basic

Why I Created This VB Add-in.

After looking at the documentation for creating an Add-In for Visual Basic I Decided to try and make the process easier.  This gave birth to the Project Wizard.  Then after messing about trying to register my Add-In I decided to make that a menu option.  Finally after receiving Delphi v2 I was quite impressed with the Repository so I decided to emulate this useful feature within Visual Basic, thus the Repository was born.

Extra

There are two DLL files and one Visual Basic Module File supplied with this Add-In, these are a collection of my own code which can be freely used by yourselves in Visual Basic Projects.  For more details see SCWL32.BAS

Your Ideas / Criticisms

If you have any ideas for future releases or criticisms about this or previous releases then please feel free to drop me a line by the following methods.

E-Mail	-	simon@tmsnet.co.uk

Tel:	-	UK 01952 405669

Postal	-	40 Broomfield Road

Newport

Shropshire

TF10 7PW

My Services

I have been using Visual Basic and Delphi To Create Various Projects for four years if you would like common functions / routines / forms for your own project within a self compiled Delphi DLL then get in touch with your requirements and I will do my best to meet your demands ( for a nominal fee).  Full projects are also undertaken.


Project Wizard

There are two common steps to creating a project using the Project Wizard

Step One

Select the type of project to be created.

Project Types

There Are 3 Different Types of Projects That Can Be Created With SC4VB Project Wizard

Visual Basic Add-In

Single Document Interface (SDI)

Multiple Document Interface (MDI)

Step Two

Specify the project name and options.

All Options Besides Location Can Be Set From Within Visual Basic Options or Options When Making EXE or DLL.

Location

The Project Wizard will create a directory (using the Project Name) under the directory specified in location.  It will also create the directory specified as location if it does not exist.

After Step Two You Will Goto The Project Type Specified In Step 1

SDI Application	MDI Application	Add-In


Repository

See Also

The Repository is an area where you can store commonly used Forms, Modules and Class Modules.

Select Repository from the Menu

Select the form, module or class file which you want to insert into your project.

Link/Copy If Link is selected then the object will be linked to the original.  If Copy is selected then the object will be copied to the same directory as the current Project File (*.VBP).

To Add and Remove objects from the Repository use the corresponding buttons.

Edit will open Notepad (or WordPad if the object is large) with the specified object.

Select Insert

This is the same as using Add File (Ctrl + D) from Visual Basic File Menu

Properties for modules can be viewed if you right click on a module and select Properties from the popup menu


DLL files

SCWL.DLL

SCWL32.DLL

SCWL32.BAS


SCWL32.BAS
SCWL Files

SCWL is broken down into three parts.

It is intended that the 16 Bit functions could be used with VB4 16 Bit (Possibly VB3 not tested) and the 32 Bit functions could be used with VB4 32 Bit.

16 Bit Functions and Procedures (SCWL.DLL)

32 Bit Functions and Procedures(SCWL32.DLL)

VB Fucntions and Procedures in SCWL32.BAS

Disclaimer


Future Ideas

For future versions of SC4VB my ideas include a resource editor that can be used directly with Visual Basic to insert and create strings and graphics, and include them in your project. (This Has Now Been Done)

Better Properties On files Within The Repository

A Help File Editor for use with projects. This will give you details of Topics and Topic ID's for ease of use within a project

If you have any ideas you would like to see implemented the contact me with them.  See About


Errors and Warnings
Warnings And Errors

Error Messages

R1	R2	D1	C1	C2	W1

W2	W3	W4	W5	W6	W7

W8

Warnings

D2

Delete

Copy Not Implemented

Project Wizard Cancel

Delete Menu


R1
R1 - Repository Error 1

You have tried to add a Form / Module / Class File which already exists in the Repository.


Repository Delete

If you continue then the object selected will be permanently removed from the Repository


R2
R2 - Repository Error 2

There was a problem loading the specified object into the project.

If The Error Continues then take a note of all the message and get in touch with details.  (To Get In Touch See About)


D1
D1 - Register DLL Error 1

Could Not Run REGSVR.EXE.

If Problem Persists then Contact Me with Complete Message. (See About)


D2
D2 - Register OLE Server Warning D2

Could Not Locate REGSVR32.EXE.

Please select location in Options


C1
C1 - Connect Add-In Error 1

This problem is serious please take a note of the complete message and get in touch (See About)


C2
C2 - Disconnect Add-in Error 2

This Problem is serious meaning a problem with the Disconnect Event for the Add-In.  Please Get In Touch (See About)


W1
W1 - Project Wizard Error 1

The Drive you selected to create your project in does not exist.

Re select the location specifying a valid Drive.


W2
W2 - Project Wizard Error 2

An error occurred whilst trying to create a Directory.  Specify a different location and try again.

If This error continues then Contact Me for Support (See About)


W3
W3 - Project Wizard Error 3

A Project of the same name already exists at the location specified.

Select a new name for the project.


Project Wizard Cancel

Cancels the creation of a project.


Delete Menu
Delete Menu - Project Wizard

When you create an Add-In you create menu options.  This just confirms that you wish to delete the menu that is in the list.


W4
W4 - Project Wizard Error 4

The Project Wizard Tried to create the location specified but could not.

Please re select the location and try again.


W5
W5 - Project Wizard Error 5

You must have at least one menu option in order to create an Add-In.


W6
W6 - Project Wizard Error 6

Each Menu must have a Class Module and you have not given a name for the Class Module.

Please specify the Class Module Name and try again.


W7
W7 - Project Wizard Error 7

You Must Specify a caption for the Menu Line.

Dont Forget To Include an & symbol for underscore.


W8
W8 - Project Wizard Error 8

When specifying a Project Name you can not use spaces.

Other restrictions may apply.  To be safe use a - z, A- Z, 0-9


Project Wizard (SDI)

This Feature Is Not Implemented Within This Version.


Project Wizard (MDI)

This Feature Is Not Implemented Within This Version.


Project Wizard Add-In

There are 2 steps to creating a Visual Basic Add-In

Step 1

Specify The Menu's

Main Menu Name - This Will Appear Directly Under The Visual Basic Add-Ins Menu

Sub Menu's - These Appear Under The Main Menu Name (In The Order Specified)

Menu Caption - Once You Select A Menu From The List Box It Must Have A Caption. (Remember The & for the underscore)

Menu Can Be Checked - Adds Basic Code to Check and UnCheck The Menu Once Selected.

Save - Saves Changes To Individual Menus In The List

Delete - Deletes Selected Menu From List

Add - Appends Another Menu To The List

Step 2

Include File Events - Adds An Extra Class Module With all events for trapping Visual Basic File Events.


Compile Resources

Compiles The Resources Opened With the Resource Editor and adds them to your project.

Caution

Not Fully Tested


Resource Editor

This will open and edit a resource script file compatible with the Microsoft 32 Bit Resource Compiler and the Microsoft 16 Bit Resource Compiler (These should be supplied with VB).

Will not validate Resource ID's which need to be a unique integer > 1.

By Clicking  [image] This Will Roll Up The Form If it is down or extend the form if it is rolled up.

Clicking [image] will close Resource Editor

When the resource editor is Rolled Up it will look like this

If The Resource Editor is extended it will look like this

Resource Command Buttons

Save - Saves Current Resource Being Edited.

Delete - Deletes Selected Resource.  (Changes To Cancel if editing a resource).

Edit - Edits The Selected Resource

Add - Adds a resource

Main Buttons

Compile 	-	Compiles Current Resource Script

Save 	-	Saves The Resource Script

New 	-	Create New Resource Script

Open 	-	Opens a Resource Script

Close 	-	Unloads Resource Editor

Copy 	-	Copies (to the clipboard) the current resource into a VB 4 Format

e.g.  String Resource 17 is Welcome If you highlight this then it will copy to Clipboard as 'GS(17)' GS is a function within SCWL32.BAS which will retrieve a string resource (See SCWL32,BAS)


16 Bit Functions and Procedures (SCWL.DLL)

  ActiveTitle	-	Returns the title of the active window

  ChangeTitle	-	Chnages the title of a window

  CommPorts	-	Returns Comm Ports available

  ExitWin	-	Exits Windows

  FileExist	-	Checks To See If A File Exists

  GetColor	-	Displays a window with a Variety of colors to choose from

  GetDate	-	Displays a window with a calendar

  GetDC	-	Retrieves a device context for the entire window.

  GetHiB	-	Retreives the Hi Byte from a Word

  GetHiW	-	Retreives the Hi Word from a long integer

  GetHwnd	-

  GetIni	-

  GetLoB	-	Retreives the Lo Byte from a Word

  GetLoW	-	Retreives the Lo Word from a long integer

  GetPath	-

  GetRes	-

  GetSymbol	-

  GetTime	-

  HDFree	-

  HDTotal	-

  HDUsed	-

  InputM	-

  IsShareLoaded	-

4

  IsLower	-

  LabelDisk	-

  CLBFind	-

  Logon	-

  MemFree	-

  NotTop	-

  OnTop	-

  OpenCD	-

  PaintOnTitle	-

  PentiumBug	-

  Percent	-

  ProperString	-

  SetActiveTitle	-

  ShellEx	-

  ShowAbout	-

  ShowDisk	-

  ShowHelp	-

  ShowOpen	-	Displays the Common Dialog Open File window

  ShowRes	-

  ShowSave	-	Displays the Common Dialog File Save As window

  ShowSearch	-

  ShowTips	-

  SoundAlike	-

  ToUpper	-

  Today	-

  WinRun	-

  WrapCursor	-

  WriteIni	-


32 Bit Functions and Procedures(SCWL32.DLL)

Those functions which end in A are the same as 16 Bit functions.  All 32 Bit functions use the stdcall method and therefore must be spelt correctly.

  ActiveTitleA	-	Returns the title of the active window

  ChangeTitleA	-	Chnages the title of a window

  ExitWinA	-	Exits Windows

  FileExistA	-	Checks To See If A File Exists

  ShowOpen	-	Displays the Common Dialog Open File window

  ShowSave	-	Displays the Common Dialog File Save As window

  GetColorA	-	Displays a window with a Variety of colors to choose from

  GetDateA	-	Displays a window with a calendar

  GetDCA	-	Retrieves a device context for the entire window.

  GetHiBA	-

  GetHiWA	-

  GetHwndA	-

  GetIniA	-

  GetLoBA	-

  GetLoWA	-

  GetPathA	-

  GetSymbolA	-

  GetTimeA	-

  HDFreeA	-

  HDTotalA	-

  HDUsedA	-

  InputMA	-

  LabelDiskA	-

  CLBFindA	-

  LogonA	-

  MemFreeA	-

  MoveForm	-

  NotTopA	-

  OnTopA	-

  PaintOnTitleA	-

  PentiumBugA	-

  PercentA	-

  ProperString	-

  SCFont	-

  SetActiveTitleA	-

n0   ShellExA	-

  ShowAboutA	-

  ShowDiskA	-

  ShowHelpA	-

  ShowSearchA	-

  ShowTipsA	-

  SoundAlikeA	-

  TodayA	-

  WinRunA	-

  WrapCursorA	-

  WriteIniA	-


VB Fucntions and Procedures
VB Functions and Procedures In SCWL32.BAS

These are a collection of mostly my own code that I find useful in projects.

Functions

AddBack	-	Adds A Back Slash \ To A Path Statement

DiskSpace	-	Returns Information About DiskSpace

DosVersion	-	Returns The Current DOS Version

FindInCombo	-	Searches A Combo Box For A String

FindInList	-	Searches A ListBox For A String

GetBluff      	-	Returns A String Of Random Characters

GetMyINI   	-	Returns A String From An INI File

d	GetMyReg    	-	Returns A String From Registration Database

GetPerc        	-	Calculates A Percentage

GetWinHwnd	-	Returns The Handle To A Window By Using The Title

GetWinINI       	-	Returns String From Win.INI

GS                    	-	Gets a String From A Resource Script

HelpProc           	-	Displays A HelpFile Or Help Contents Screen

IsDrive               	-	Verifys Wether A Drive Exists

JustDrive            	-	Returns Just The Drive From A Path Statement

JustExtension      	-	Returns The Extension Of A File From Filename

JustFilename        	-	Returns The Filename and Extension From A String

JustPath	-	Returns Just The Path From A String

MyPath	-	Same As App.Path But Makes Sure The Is A BackSlash On The End

NotBack	-	Returns A Path Statement Without The BackSlash

OpenProc	-	Shortcut To ShowOpen See SCWL.DLL and SCWL32.DLL

PlayResSound	-	Plays A Sound From A Resource File

PlaySound	-	Plays A Wav File

ReverseString	-	Reverses a string

SaveProc	-	Shortcut To ShowSave See SCWL.DLL and SCWL32.DLL

ShortenPath	-	Shortens A Path Statement

StripSpaces	-	Strips All Spaces Out OF A String

StripU	-	Strips The Underscore (&) From A String

SystemDirectory	-	Returns The System Directory

UserLogon	-	ShortCut To Logon.  See SCWL.DLL and SCWL32.DLL

WindowsDirectory	-	Returns The Windows Directory

WindowsVersion	-	Returns The Windows Version

WriteMyINI	-	Writes A String To An INI File

WriteMyReg	-	Writes A String To The Registry

Sub Routines

AboutBox	-	ShortCut To ShowAbout See SCWL.DLL and SCWL32.DLL

CenterForm	-	Centers A VB Form To The Screen

MP	-	Same AS Screen.MousePointer

RunTillFinished	-	Same As Shell But Wont Return Until The Program Has Finished


Add File

A Replacement For The Conventional Add File Method Since That Has Been Replaced With The Repository


Repository Properties

Displays Properties For Currently Selected Item In The Repository

Properties For Forms

Not Yet Implemented

Properties For Modules

File Size in bytes.

Name of Module.

Date Module Was Last Updated.

Function and Sub Routine Names

Description of currently Selected Sub Routine or Function

Properties For Class Modules

Not yet Implemented


  AddBack

Applies

Adds A Back Slash To A Path Statement

Syntax

AddBack(PathToAddTo)

Parameters

PathToAddTo	-	The Path Statement That A BackSlash Is Being Added To

Returns

String	-	PathToAddto With A BackSlash (\) Added On The End

Example

Open AddBack(App.Path)  & "MyFile.TXT" For OutPut as #1

Print #1, AddBack(App.Path)

Close #1


  DiskSpace

Applies

This Function will analyse the disk specified to return Disk Space Free/Used/Total.  This function is a shortcut to Shortcut to HDUsed, HDFree and HDTotal in SCWL.DLL and SCWL32.DLL

Syntax

DiskSpace(Disk, DiskOption, ReturnStyle)

Arguments

Disk As String	-	Specifies The Disk To Interrogate eg C (for C:\)

DiskOption As Integer	-	What To Return 0 = Used Space, 1 = Free Space, 2 = Total Space

ReturnStyle As Integer	-	Return As 0 = K Bytes, 1 = Mbytes, 2 = Bytes

Returns

-10000	-	Invalid Disk ie Not A - Z was passed in Disk Argument

-1	-	Disk Does Not Exist

Else	-	Worked Return Value Depends On DiskOption and Return Style

Example:

This Example Will Update a Label Named lblDiskFree To Display The Free Disk Space On The C Drive

Sub Timer1_Timer ()

Static LastFree as Variant,DiskToUse as String

Dim ThisFree as Variant

If DiskToUse = "" Then

DiskToUse = "C:" 'SetDefaultDrive

End If

ThisFree = DiskSpace(DiskToUse, 1,1)

If ThisFree <> LastFree Then

LastFree = ThisFree 'Store New Value

Select Case LastFree

Case -10000 'DiskToUse is not a valid Drive

DiskToUse = "C:" 'Set As Default Drive

Case -1 'Drive Does Not Exist

MsgBox DiskToUse & " Is Not A Valid Drive.",16,"Sample"

Case Else 'Succesful

lblDiskFree.Caption = Cstr(LastFree) & " MB" 'Update The Label To _ Display Correct Free Disk Space

End Select

End If

End Sub

See Also 	HDFree	HDUsed	HDTotal


  DosVersion

Applies

Returns The Version Of DOS Currently Being Used.

Syntax

DosVersion()

Arguments

No Arguments

Returns

String Value Of DOS Version

Example:

This Example Displays A MsgBox Showing The Current DOS Version

Sub Command1_Click ()

MsgBox "Current DOS Version = " & DosVersion, 64, "Sample"

End Sub


  MyPath

Applies

Equivilant To App.Path But Ensures That The Path Ends With a BackSlash \

Syntax

MyPath()

Arguments

No Arguments

Returns

Path Statement With \ (BackSlash) On The End

Example

This Example Displays A Message Box tith The Location Of The Application

Sub Command1_Click ()

Msgbox "I Am Located At " & MyPath

End Sub


  MP

Applies

Changes The Value Of The Screen MousePointer

Syntax

MP NewMousePointer

Arguments

NewMousePointer	-	Integer Representing MousePointer

Returns

No Return Value

Example

This Example Will Change The Mouse Pointer During A Longish Task

Sub Form1_Load ()

mp 11 'Set Mouse Pointer to HourGlass

Dim Rt

Rt = GetMyReg("Repository\Options\", "Left")

If IsNumeric(Rt) Then Me.Left = CInt(Rt) Else Me.Left = 1080

Rt = GetMyReg("Repository\Options\", "Top")

If IsNumeric(Rt) Then Me.Top = CInt(Rt) Else Me.Top = 1170

Call GetReposSettings

Me.Refresh

tab1.Visible = True

Command1.Visible = True

Command2.Visible = True

Command3.Visible = True

Option1.Visible = True

Option2.Visible = True

mp 0 'Reset Mouse Pointer To Arrow

End Sub


AppliesToBoth
This Is Relevant For

16 Bit and 32 Bit Programming


Applies16
This Is Relevant For

16 Bit Programming Only


Applies32
This Is Relevant For

32 Bit Programming Only


  GS

Applies

Gets a string from a resource file.

Syntax

GS(StringNo, ToInsert)

Arguments

StringNo	-	Integer Representing String in Resource File.

ToInsert	-	Optional Parameter.  If Resource String Contains %1 it will be replaced with ToInsert

Returns

String	-	The String Returned From The Resource File

Example

This Example Displays A Message Box With Two Strings Returned From A Resource File

String 1000 = "%1 Fellow VBer"

String 1001 = "/n/nHope Your Enjoying This

Sub Command1_Click ()

Msgbox GS(1000,"Hello") & GS(1001),64,"Sample"

End Sub

The Result Would Be This Message Box

See Also	Resource Editor


  HelpProc

Applies

Opens a specified Help File

Shortcut To ShowHelp and ShowSearch

Syntax

HelpProc (FormName,  TopicNo)

Paramaters

FormName	-	Name Of A Form Needed For Handle (Hwnd)

TopicNo	-	Optional Long Indicating The Topic No To Show.  If this value is missing then the search box will be displayed .

Returns

Integer	-	None Zero If Succesful

Example

This Example Displays Topic 430 from The Help File Mentioned In The Global Variable List

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)

If KeyCode = KEY_F1 Then Call HelpProc(Me, 430)

End Sub

See Alse	ShowHelp	ShowSearch


  StripSpaces

Applies

Strips all spaces from a string

Syntax

StripSpaces(ToStripFrom)

Parameters

ToStripFrom	-	String that spaces are to be stripped from

Returns

String	-	ToStripFrom With no spaces in

Example

The following will take the DumStr constant and produce a Message Box like

Sub Command1_Click()

Const DumStr = "This Should Strip The Spaces Out"

msgbox StripSpaces(DumStr),64,"Sample"

EndSub


  SaveProc

Applies	Common Dialog

SaveProc is a shortcut to ShowSave

Displays a Save As dialog box

Syntax

SaveProc(Title, Filter)

Parameters

Title	-	The title to be displayed in the window

Filter	-	The filter to be used in the Save As Dialog Box

Returns

String	-	If Cancelled will return blank string "".  If Succesful will return the name of a file

Example

The following example will display a Save As Dialog Box and Get A File Name

Sub Command1_Click ()

Dim Rt as string

Rt = SaveProc("Save My File As...","My File Type|(*.txt)|All Files|*.*")

If Rt = "" then Exit Sub 'User Cancelled

Mp 11

Open Rt For Output as #1  'Open File

Print #1, Text1.Text  'Save Contents Of Text1 To File

Close #1  'Close File

Mp 0

End Sub

See Also	ShowSave	OpenProc	ShowOpen


  OpenProc

Applies	Common Dialog

OpenProc is a shortcut to ShowOpen

Displays an Open dialog box

Syntax

OpenProc(Title, Filter)

Parameters

Title	-	The title to be displayed in the window

Filter	-	The filter to be used in the Open Dialog Box

Returns

String	-	If Cancelled will return blank string "".  If Succesful will return the name of a file

Example

The following example will display an Open Dialog Box and Get A File Name

Sub Command1_Click ()

Dim Rt as string

Rt = OpenProc("Open One Of My Files...","My File Type|(*.txt)|All Files|*.*")

If Rt = "" then Exit Sub 'User Cancelled

Mp 11

Open Rt For Input As #1  'Open File

Test1.Text = Input$(LOF(1), 1) 'Get Contents Of Rt and Place In Text1

Close #1  'Close File

Mp 0

End Sub

See Also	ShowOpen	SaveProc	ShowSave


  StripU

Applies

This Function Will Strip The Underscore (ampersand '&') form a string.

Syntax

StripU(TextToStrip)

Parameters

TextToStrip	-	String of text to strip the ampersand from

Returns

String	-	TextToStrip with no ampersands in it

Example

This example will get a menu caption and strip the ampersand from it

Assuming MnuF.Caption = "&Open" (displays as Open)

Sub Command1_Click ()

MsgBox StripU(MnuF.Caption),64,"Sample"

End Sub

The Result From This Would Be


  NotBack

Applies

NotBack Takes A Path Statement And Removes The BackSlash From It.

Syntax

NotBack(Path)

Parameters

Path	-	Path Statement To Take Backslash Off

Returns

String	-	Path without a Backslash on the end

Example

Sub Command1_Click ()

End Sub

See Also	AddBack


  GetBluff

Applies

GetBluff will build a string of randomly generated characters

Syntax

GetBluff(BluffLen)

Parameters

BluffLen	-	Integer for length of string to return

Returns

String of random characters the length of BluffLen

Example

This example will generate a string of 50 random characters and display the result in a Message Box

Sub Command1_Click ()

Dim RandomString as String

RandomString = GetBluff(50)

Msgbox "This is a randomly generated string." & Chr$(13) & Chr$(13) & RandomString,64,"Sample"

End Sub


  SystemDirectory

Applies

Returns a string containing the System Directory in a path statement

Syntax

SystemDirectory()

Parameters

No Parameters

Returns

String containing the path to the System Directory

Example

This example will display the system Directory in a Message Box

Sub Command1_Click ()

Dim Msg As String

Msg = "The System Directory is "

Msg = Msg & SystemDirectory()

MsgBox Msg, 16, "Sample"

End Sub

See Also	WindowsDirectory	WindowsVersion	DosVersion


  WindowsDirectory

Applies

Returns a string containing the Windows Directory in a path statement

Syntax

WindowsDirectory()

Parameters

No Parameters

Returns

String containing the path to the Windows Directory

Example

This example will display the Windows Directory in a Message Box

Sub Command1_Click ()

Dim Msg As String

Msg = "The Windows Directory is "

Msg = Msg & WindowsDirectory()

MsgBox Msg, 16, "Sample"

End Sub

See Also	SystemDirectory	WindowsVersion	DosVersion


  WindowsVersion

Applies	Note

Return The Current Version Of Windows

Syntax

WindowsVersion()

Parameters

No Parameters

Returns

String Containing The Current Version Of Windows

Example

This example will display the current version of windows in a Message Box

Sub Command1_Click ()

Dim Msg as String

Msg = "Windows Version = "

Msg = Msg & WindowsVersion()

MsgBox Msg, 64, "Sample"

End Sub

See Also	WindowsDirectory	SystemDirectory	DosVersion


Note
Extra Information

In Windows 3.1 Will Return 3.1

In Windows 3.11 will return 3.1

In Windows 95 will return 3.95


  CenterForm

Applies

Centers a form to the screen

Syntax

CenterForm(NameOfForm)

Parameters

NameOfForm	-	Name of form to be centered or reserved word Me

Returns

Does Not Return Anything

Example

Sub Form_Resize()

CenterForm Me  ' Center form to screen

End Sub


  ShortenPath

Applies

Shortens a path statement for display only

Syntax

ShortenPath(LenOfPath, Path)

Parameters

LenOfPath	-	Maximum length of the path to return

Path	-	Path to shorten

Returns

String of Path no longer than LenOfPath

Example

Sub Command1_Click ()

const ThePath = "C:\This\Is\A\Madeup\pathst\atement\"

Dim Msg as String

Msg = "Using ShortenPath With A Length Of 25" & Chr$(13) & ThePath & chr$(13)

Msg = Msg & "It Comes Out As " & ShortenPath(25, ThePath)

MsgBox Msg, 64, "Sample"

End Sub

This will be displayed as follows

See Also	JustFileName	JustPath	JustExtension	JustDrive


  GetPerc

Applies

Calculates a percentage

Syntax

GetPerc(Number [,Total])

Parameters

Number	-	This is the current value that needs calculating

Total	-	Optional Numeric value of the total number

Returns

Integer representing the calculated value

Example

This example will calculate the percentage during a loop of records in a recordset

Sub Command1_Click ()

Dim I as Long, DB as Database, RS as Recordset, RSRC As Long

Set DB = OpenDatabase("C:\MyDB.MDB")

Set RS = DB.OpenRecordSet("MyRS")

On Error Resume Next

RS.Movelast: RSRC = RS.RecordCount: RS.MoveFirst

For I = 0 To RSRC -1

If RS("AnyField") = "Something" Then

'Process Your Code

End If

If Not MyPercBar.PercentValue = GetPerc(I, RSRC) Then

'Update if Different to save flicker

MyPercBar.PercentValue = GetPerc(I, RSRC)

End if

Next I

RS.Close

DB.Close

End Sub

See Also	Percent


  GetWinHwnd

Applies

Returns The handle to a window based on the title of the window

Syntax

GetWinHwnd(NameOfForm, TitleOfProg)

Parameters

NameOfForm	-	Name of a form object

TitleOfProg	-	Title Of  Window to find

Returns

Long -1 = No TitleOfProg; 0 = Not Found; > 0  = Found

Example

This example will search all windows for a title of "File Manager" if found it will change to "Windoze File Mangler"

Sub Timer1_Timer ()

Const MyTitle = "File Manager"

Const MyNewTitle = "Windoze File Mangler"

Dim Result As Long, ResultLong As Long

Result = GetWinHwnd(Me, MyTitle)

If Result > 0 Then 'Found So Change Title

    ResultLong = changetitle(Me.hWnd, MyTitle, MyNewTitle)

End If

End Sub

See Also	GetHwnd	ActiveTitle	ChangeActiveTitle


  IsDrive

Applies

Checks A Path Statement To See If The Specified Drive Is A Valid Drive

Syntax

IsDrive(Drive)

Parameters

Drive	-	String Containing a valid drive name

Returns

True if Drive is valid else False

Example

This Example will display message box when no Floppy is in the drive

Sub Timer1_Timer()

If IsDrive("A:\") = False Then

    MsgBox "There Is No Disk In The Floppy Drive", 64, "Sample"

End If

End Sub

Message Box should look like this

See Also	JustDrive	JustFileName	JustExtension


  RunTillFinished

Applies

Runs an executable application until it is finished

Syntax

RunTillFinished(ToRun [,CommandLine])

Parameters

ToRun	-	Name of the application to run.

CommandLine	-	Optional command line arguments

Returns

Does Not Return Anything

Example

This example will run notepad opening MyIni.INI and when it is finished a message box will be displayed to say it is finished.

Sub Command1_Click ()

Const ToRun = "C:\Windows\Notepad.EXE"

Const MyIni = "C:\Windows\MyIni.INI"

'Open App IniFile and Loop Until NotePad is Finished

RunTillFinished ToRun, MyIni

MsgBox "Finished Editing " & MyIni, 64, "Sample"

End Sub


  JustFilename

Applies

Returns the filename from a path statement.

Syntax

JustFileName(FName)

Parameters

FName	-	Path and file statement where FileName is to be extracted from

Returns

The file name extracted from FName

Example

This example will open a file and put just the file name into the caption of the form along with the application title

Sub Command1_Click ()

Dim Rt = OpenProc("Open A Text File...", "My Text Files|*.txt")

If Rt = "" then Exit Sub

Me.Caption = JustFileName(Rt) & " My Mega Application"

End Sub

See Also	JustPath	JustExtension	JustDrive	ShortenPath


  JustPath

Applies

Returns the path from a path and filename statement

Syntax

JustFileName(ToChange)

Parameters

ToChange	-	Path and file statement where path is to be extracted from

Returns

The path extracted from ToChange

Example

This example will open a file and put just the path in the Global LastUsedPath Variable

Sub Command1_Click ()

Global LastUsedPath as string 'Put This Lin in A Module

Dim Rt = OpenProc("Open A Text File...", "My Text Files|*.txt")

If Rt = "" then Exit Sub

LastUsedPath = JustPath(Rt)

End Sub

See Also	JustFileName	JustExtension	JustDrive	ShortenPath


  JustExtension

Applies

Returns the extension from a path and filname statement

Syntax

JustExtension(GetExtFrom)

Parameters

GetExtFrom	-	Path and file statement where the extension is to be extracted from

Returns

The extension extracted from GetExtFrom

Example

This example will open a file and put just the file name into the caption of the form along with the application title

Sub Command1_Click ()

Dim Rt as string,TExt as String,TempStr as string

Rt = OpenProc("Open A Text File...", "My Text Files|*.txt")

If Rt = "" then Exit Sub

'Check extension is registered in the Win.INI

TExt = JustExtension(Rt)

'See If this is associated in Win.INI

TempStr = GetWinIni("Extensions",Text,"")

If TempStr = "" Then

Msgbox "File Type " & Fext is not associated.", 64, "Sample"

End If

End Sub

See Also	JustFileName	JustPath	JustDrive	ShortenPath


  JustDrive

Applies

Retreives the drive from the begining of a path statement.

Syntax

JustDrive(Path)

Parameters

Path	-	Path statement from which the drive is to be extracted

Returns

Returns the drive from the path statement

Example

This example will see if there is more than 20000 bytes of free disk space before opening a file

Sub Command1_Click ()

Dim DiskFree as Long, Rt as String

Rt = OpenProc("Open a Text File...","All Text Files |*.txt")

If Rt = "" then Exit Sub

Select Case DiskSpace(JustDrive(Rt), 1, 2)

Case > 20000

'Enough Disk Space Process File

Case -1 'drive Not there

MsgBox "Invalid Drive."

Case Else

'Not Enough Space to Process File

End Select

End Sub

See Also	JustFileName	JustPath	JustExtension	ShortenPath


  GetMyINI

Applies

Retreives string from Initialisation File (INI)

Syntax

GetMyINI(Section, Key [, DefaultReturn[, FileINI]])

Parameters

Section	-	The Section Within the Ini File (will be enclosed with [] brackets)

Key	-	The string before the equals sign

DefaultReturn	-	Optional What to return if Section/Key not found

FileINI	-	Optional If no Global Const for IniFile then must specify an Ini File to Use

Returns

Section/Key if found else DefaultReturn.  If DefaultReturn is missing return blank string

Example

This example will get the left and top settings for a form in the form_load event

Sub Form_Load ()

'The Form will default to a left and top of 500 if nothing is in the file

Me.Left = Cint(GetMyINI("Position", "Left", 500))

Me.Top = CInt(GetMyINI("Position", "Top", 500))

End Sub

See Also 	WriteMyReg	WriteMyINI	GetWinINI	GetMyReg


  GetWinINI

Applies

Retreives string from Initialisation File (INI)

Syntax

GetWinINI(Section, Key [, DefaultReturn])

Parameters

Section	-	The Section Within the Ini File (will be enclosed with [] brackets)

Key	-	The string before the equals sign

DefaultReturn	-	Optional What to return if Section/Key not found

Returns

Section/Key if found else DefaultReturn.  If DefaultReturn is missing return blank string

Example

This example will get the name of the default printer

Sub Command1_Click ()

Dim DefPrinter As String

DefPrinter = GetWinINI("Windows","Device","No Printer Found")

If Instr(1, DefPrinter, ",") > 0 then

DefPrinter = Left$(DefPrinter,Instr(1, DefPrinter,",") -1)

End If

Msgbox "The Default Printer Is " & DefPrinter

End Sub

See Also 	GetMyReg	GetMyINI	WriteMyINI	WriteMyReg


  GetMyReg

Applies

Retreives string from registry

Syntax

GetMyReg(Section, Key [, DefaultReturn[, FileINI]])

Parameters

Section	-	The Section Within the Ini File (will be enclosed with [] brackets)

Key	-	The string before the equals sign

DefaultReturn	-	Optional What to return if Section/Key not found

FileINI	-	Optional If no Global Const for IniFile then must specify an FileIni to Use

Returns

Section/Key if found else DefaultReturn.  If DefaultReturn is missing return blank string

Example

This works the same as GetMyINI

See Also 	GetMyINI	WriteMyReg	WriteMyINI	GetWinINI


  PlayResSound

Applies

Plays a Wav file from a resource script.

Syntax

PlayResSound(ResID, Play)

Parameters

ResID	-	Resource ID Number

Play	-	Play type.  1 = Dont return till finished, 2 = return while playing file

Returns

1 if Play is invalid otherwise not sure

Example

Plays Resource 60001 from Res File

Sub Command1_Click()

Dim Rt as Integer

Rt = PlayResSound(60001,1)

End Sub


  PlaySound

Applies

Plays a Wav file

Syntax

PlayResSound(Filename, Play)

Parameters

FileName	-	WAV filename

Play	-	Play type.  1 = Dont return till finished, 2 = return while playing file

Returns

-1 if File Does not exist otherwise not sure

Example

Plays C:\Windows\Media\Tada.Wav through soundcard

Sub Command1_Click()

Dim Rt as Integer

Rt = PlaySound("C:\Windows\Media\Tada.Wav",1)

End Sub

See Also	PlayResSound


  UserLogon

Applies

Displays a logon screen.  shortcut to Logon (See SCWL.DLL and SCWL32.DLL)

Syntax

UserLogon([Title])

Parameters

Title	-	Optional Title to be displayed in Logon window

Returns

LogonType Structure.  If LogonTypeStructure = -1 then user cancelled otherwise OK was pressed

Example

Sub Command1_Click ()

Dim ThisLogon As LogonType, Msg as String

ThisLogon = UserLogon("My Logon Window")

If ThisLogon.Result = -1 then

MsgBox "User Cancelled"

Else

Msg =  "Logon Name = " & ThisLogon.Name & Chr$(13)

Msg = Msg & "Logon password = " & ThisLogon.Password

MsgBox Msg, 64, "Sample"

End If

End Sub


LogonType Structure

Type LogonType

    Name As String * 40

    Password As String * 40

    Result As Integer

End Type


  AboutBox

Applies

Displays About Box

Syntax

AboutBox(Title, Version [, Icon])

Parameters

Title	-	Title of Application

Version	-	Version of Application

Icon	-	Optional Icon File (*.ico) to display as picture

Returns

Nothing to Return

Example

This example displays about box when About Is selected from menu

Sub MnuHelpAbout_Click ()

Call AboutBox("SC 4 Visual Basic", CStr(App.Major & "." & _

App.Minor & "." & App.Revision))

End Sub


  WriteMyINI

Applies

Writes a string to an Initialisation file

Syntax

WriteMyINI(Section, Key, Setting [,FileINI])

Parameters

Section	-	The Section Within the Ini File (will be enclosed with [] brackets)

Key	-	The string before the equals sign

Setting	-	The new string to be saved

FileIni	-	Optional If no Global Const for IniFile then must specify an Ini File to Use

Returns

The return value is nonzero if the function is successful. Otherwise, it is zero.

Example

This example will save the left and top settings for a form to the Registry

Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)

'The Form will default to a left and top of 500 if nothing is in the Registry

Dim Rt as Integer

Rt = WriteMyReg("Position","Left",Cstr(Me.Left))

Rt = WriteMyReg("Position","Top",Cstr(Me.Top))

End Sub


  WriteMyReg

Applies

Writes a string to the System Registration Database

Syntax

WriteMyReg(Section, Key, Setting [,FileINI])

Parameters

Section	-	The Section Within the Ini File (will be enclosed with [] brackets)

Key	-	The string before the equals sign

Setting	-	The new string to be saved

FileIni	-	Optional If no Global Const for IniFile then must specify an Ini File to Use

Returns

The return value is nonzero if the function is successful. Otherwise, it is zero.

Example

This example will save the left and top settings for a form to an initialisation file

Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)

'The Form will default to a left and top of 500 if nothing is in the file

Dim Rt as Integer

Rt = WriteMyINI("Position","Left",Cstr(Me.Left))

Rt = WriteMyINI("Position","Top",Cstr(Me.Top))

End Sub

See Also	WriteMyINI	GetMyReg	GetMyINI	Global Variable List


ActiveTitle

Applies

Returns the title and Hwnd of active window

Syntax

ActiveTitle(ReturnTitle)

Parameters

ReturnTitle	-	Null Terminated String to receive the title

Returns

Hwnd to the active window, ReturnTitle contains the title of the window

Example

When the VB Debug Window becomes the active window then a msgbox will be displayed.

Sub Timer1_Timer ()

Dim RtnTitle As String, DebugHwnd As Integer, Result As Integer

RtnTitle = String(300, 0) 'Buffer out string

Result = ActiveTitle(RtnTitle)

If InStr(1, RtnTitle, "Debug Window") > 0 Then 'Program Manager is active

    'Store Program Manager's Handle in the Variable ProgManHwnd

    DebugHwnd = Result

    MsgBox "Debug Window Is Now Active", 64, "Sample"

End If

End Sub


ChangeTitle

Applies

If find a window with specified title then change it to new title

Syntax

ChangeTitle(MHwnd, ExistTitle, NewTitle)

Parameters

MHwnd	-	Handle of form

ExistTitle	-	Null Terminated String specifying title to find (case sensitive)

NewTitle	-	Null Terminated String containing new title

Returns

If function finds ExistTitle and succesfully changes it to NewTitle then the return value is 1

Example

This example will change all occurences of Debug Window to My Dubbuging Window

Sub Timer1_Timer ()

Const OldT = "Debug Window"

Const NewT = "My Debbuging Window"

Dim Rt as Integer

Rt = ChangeTitle(me.hwnd, OldT, NewT)

'Ignore return Values

End Sub


CommPorts

Applies

Checks to see what Comm Ports are avoilable on the computer

Syntax

CommPorts()

Parameters

No Parameters

Returns

Combination of the following

Result	Comm Available

    1	1

    2	2

    4	3

    8	4

Example

Sub Command1_Click ()

Dim Comms As Integer, Msg As String

Comms = CommPorts()

Select Case Comms

Case 1

    Msg = "1"

Case 2

    Msg = "2"

Case 3

    Msg = "1, 2"

Case 4

    Msg = "3"

Case 5

    Msg = "1, 3"

Case 6

    Msg = "2, 3"

Case 7

    Msg = "1, 2, 3"

Case 8

    Msg = "4"

Case 9

    Msg = "1, 4"

Case 10

    Msg = "2, 4"

Case 11

    Msg = "1, 2, 4"

Case 12

    Msg = "3, 4"

Case 14

    Msg = "2, 3, 4"

Case 15

    Msg = "1, 2, 3, 4"

Case Else

    Msg = "Unknown"

End Select

MsgBox "Comm's Available Are " & Msg, 64, "Sample"

End Sub


GetDC

Applies

Retrieves a device context for the entire window, including title bar, menus, and scroll bars.

Syntax

GetDC(Hwnd)

Parameters

Hwnd	-	Handle to the form or window to retrieve the Device Context

Returns

Returns the handle of the device context for the given window, if successful. Otherwise, it is zero

Example

Sub Command1_Click

Dim CurrDC as Integer

Select Case CurrDC()

Case 0

'No Device Context

Case Else

'Worked so do Painting or other DC Related

End Select

End Sub


ShowOpen

Applies	Common Dialog

Displays the Common dialog File Open window

Syntax

ShowOpen(Title, Filter, DefaultDir, ReturnFile)

Parameters

Title	-	Null Terminating String specifying the title to display in window

Filter	-	Null Terminated String specifying the File Filter

DefaultDir	-	Null Terminated String specifying the initial directory

ReturnFile	-	Null Terminated String specifying the file which will be returned

Returns

Integer:  -1 if the user cancells else an integer greater than 0 represents the length of the returnfile

Example

Sub Command1_Click ()

Dim Rt as Integer, ReturnFile As String

ReturnFile = String(500, 0)

Rt = ShowOpen("My title", "All Files|*.*", App.Path, ReturnFile)

If Rt = -1 then Exit Sub

ReturnFile = Left$(ReturnFile,Rt)

Msgbox ReturnFile & " Was Returned.",64, "Sample"

End Sub

See Also	SaveProc	OpenProc	ShowSave


ExitWin

Applies

Closes Windows

Syntax

ExitWin(ExitStyle)

Parameters

ExitStyle	-	Windows Exit Styles

Returns

Does Not Return A Value

Example

This example takes three command butons in a control array and depending on the button pressed uses the ExitWin Function

Sub Command1_Click (Index as Integer)

Select Case Index

Case 0 'Close Normal

CloseWindows ExitWin_Normal

Case 1 'Restart Windows

CloseWindows ExitWin_Restart

Case 2 'Reboot computer

CloseWindows ExitWin_ReBoot

End Select

End Sub


FileExist

Applies

Checks to see if a file exists using Assembly Language

Syntax

FileExist(FileName)

Parameters

FileName	-	Null Terminated String containing the FileName to check

Returns

0 if file does exist else 1 if it does not exist See FileExist Constants

Example

This example checks to see if AutoExec.Bat exists

Sub Command1_Click ()

If FileExist("C:\AutoExec.BAT") = FileDoesExist then

MsgBox "C:\AutoExec.Bat is There.", 64, "Sample"

Else

MsgBox "C:\AutoExec.Bat is Not There.", 64, "Sample"

End If

End Sub


ShowSave

Applies	Common Dialog

Displays the Common dialog File SaveAs window

Syntax

ShowSave(Title, Filter, DefaultDir, ReturnFile)

Parameters

Title	-	Null Terminating String specifying the title to display in window

Filter	-	Null Terminated String specifying the File Filter

DefaultDir	-	Null Terminated String specifying the initial directory

ReturnFile	-	Null Terminated String specifying the file which will be returned

Returns

Integer:  -1 if the user cancells else an integer greater than 0 represents the length of the returnfile

Example

Sub Command1_Click ()

Dim Rt as Integer, ReturnFile As String

ReturnFile = String(500, 0)

Rt = ShowSave("My title", "All Files|*.*", App.Path, ReturnFile)

If Rt = -1 then Exit Sub

ReturnFile = Left$(ReturnFile,Rt)

Msgbox ReturnFile & " Was Returned.",64, "Sample"

End Sub


GetHwnd

Applies

Retreives the handle to a window using the title

Syntax

GetHwnd(Mhwnd, WindowTitle)

Parameters

Mhwnd	-	Handle of form

WindowTitle	-	Title of window to find

Returns

Handle to the window if succesful else 0 if window not found

Example

This example will use gethwnd to determine if the DebugWindow is Visible or not

Sub Command1_Click ()

Dim Result as Integer

Result = GetHwnd(me.Hwnd, "Debug Window")

If Not Result = 0 then

Debug.Print "The Debug Window Is Visible"

Else

MsgBox "The Debug Window Is Not Present.", 64, "Sample"

End If

End Sub


Get Hi/Lo

Applies	Warning	Word Data Type

There are four functions for getting the LoByte, HiByte, LoWord, HiWord.

GetHiW

GetLoW

GetHiB

GetLoB

Please See Warning


Warning

This is still being developed and can not be fully relied upon.

Future releases will hopefully see this function completed


Open Project

User Defined Tabs

This option replaces the conventional Open Project dialog by giving users the ability to store Projects in a repository.

See User Defined Tabs for creating Project Types (these are just tabs, allowing the user to easily store projects).


Inform

If you use this software could you please inform me via E-Mail, Snail Mail or send me a postcard

If you inform me that you are using this software then you will automatically receive updates as and when they are done.


Inc

Applies

Increments an integer by 1

Syntax

Inc(x)

Parameters

x	-	Integer to increment

Returns

If Succesful will will return x + 1 else return 0

Example

No Example

See Also	Dec


Dec

Applies

Decrements an integer by 1

Syntax

Dec(x)

Parameters

x	-	Integer to decrement

Returns

If Succesful will will return x - 1 else return 0

Example

No Example

See Also	Inc


ReverseString

Applies

Reverses a string or gnirts a sesreveR

Syntax

ReverseString(StringToReverse)

Parameters

StringToReverse	-	The string that is to be reversed

Returns

StringToReverse backwards

Example

No Example


  FindInCombo

Applies

Searches a combo box for a string and returns index of first string matching

Syntax

FindInCombo(Handle,Text)

Parameters

Handle	-	Hwnd of combo box to search

Text	-	Text to search for

Returns

Long	-	ListIndex of first matching string if found else return -1

Example

Sub Text1_Change ()

Combo1.ListIndex = FindInCombo(Combo1.Hwnd, Text1.Text)

End Sub


  FindInList

Applies

Searches a list box for a string and returns index of first string matching

Syntax

FindInList(Handle,Text)

Parameters

Handle	-	Hwnd of list box to search

Text	-	Text to search for

Returns

Long	-	ListIndex of first matching string if found else return -1

Example

Sub Text1_Change ()

List1.ListIndex = FindInCombo(List1.Hwnd, Text1.Text)

End Sub


Glossary

B

BackSlash

C

Common Dialog

F

File Filter

FileExist Constants

G

Global Variable List

N

Null Terminated String

O

Optional

W

Windows Exit Styles

Word Data Type


BackSlash

BackSlash (\) is the character which seperates directory's within a path statement


Common Dialog

There are two Common Dialog DLL Files

Commdlg.DLL

Comdlg32.DLL

These both provide a common interface for applications to use.

Also there is a commdlg.VBX which utilises the above DLL files


File Filter

The filter is made up of two parts

Description        -        String containing description of filter

File types           -        Files types

there is a pipe character | seperating the description and the file

types.  If using multiple filters then they too should be seperated

by a pipe.

Example

Single Filter

"My Text Files (*.TXT)|*.txt"

Multiple filter

"MyText Files (*.TXT)|*.txt|All Files (*.*)|*.*


FileExist Constants

The two constants for use with FileExist are

Global Const FileDoesExist = 0 'Indicates that the file exists

Global Const FileDoesNotExist = 1 'Indicates the file does not exist


Global Variable List

There Are 3 Variables Which Need To Be Placed In A Seperate  BAS File Within VB Project If You Plan To Use SCWL32.BAS

Global Const Inifile = "SC4VB.INI"

Global Const Title$ = "SC 4 Visual Basic"

Global Const FileHelp = "SC4VB.HLP"

IniFile specifies an ini file to be used by INI File and Registry Routines.

Title$ specifies the Title of your application

FileHelp specifies the name of your help file


Null Terminated String

A string that is buffered out and ends with a terminating character

A blamk string or a string with length less than 2 is not null terminated


Optional

This Parameter value is optional/It is not always required


Windows Exit Styles

The three windows exit styles are

Global Const ExitWin_Normal = &H1 'Close Windows Normal

Global Const ExitWin_Restart = &H2 'Restart Windows

Global Const ExitWin_Reboot = &H3 'Reboot Computer


Word Data Type

The Word Data Type is a type of integer

Numeric Value is 0  ..  65535

Storage is Unsigned 16-bit

This Data Type is not Supported Within Visual Basic please use

Integer/Long Integer